#! /bin/bash
clear
echo Welcome Use Custom DreamHeartOS ISO Creator
toilet Wealcome
echo 开始进入chroot
echo 输入exit退出chroot
cd squashfs
sudo mount --bind squashfs-root squashfs-root
sudo mount -t proc none squashfs-root/proc
sudo mount -t sysfs none squashfs-root/sys
sudo mount -o bind /dev squashfs-root/dev
sudo mount -o bind /dev/pts squashfs-root/dev/pts
sudo cp -L /etc/resolv.conf squashfs-root/etc  
sudo cp -L /etc/hosts squashfs-root/etc
echo 请在进入系统后执行pacman-key --init pacman-key --populate
echo 请您自己进行配置系统环境，否则chroot某些功能无法正常使用
echo 修改系统信息请修改/etc/os-release or /etc/lsb-release
echo 输入exit退出chroot环境
sudo chroot squashfs-root /bin/bash
echo 进入打包环节
cd ..
sh pack.sh
